Object-oriented programming

OO design and programming promotes:

Object-Oriented Paradigm

Handling problems and abstraction

Abstraction
An example

Model is created. What is next?

Properties of Abstract Data Types

Abstract data type
Definition

Importance of Data Structure Encapsulation

Importance of Data Structure Encapsulation

Importance of Data Structure Encapsulation

Notation of ADT

Notation of ADT
An example

Abstract data types and object-orientation

Implementation of ADT:
Step 1: Instances definition

Implementation of ADT:
Step 2: set(1)

Implementation of ADT:
Step 2: set(1) (Cont.)

Implementation of ADT:
Step 3: add

Implementation of ADT:
Step 3: add (Cont.)

Class

Class
Example

Objects
What is an object?

Objects
How objects behave?

Objects and Messages
How objects communicate?

Objects
How objects communicate?

Relationships

A-Kind-Of relationship
Point class

A-Kind-Of relationship
Circle class

A-Kind-Of relationship
Comparison of Point and Circle

Illustration of “A-Kind-Of” relationship

Is-A relationship

Part-Of relationship

Has-a relationship

Inheritance

Inheritance and
part-of relationship

Inheritance and
is-a relationship

Inheritance
Definition

Inheritance graph

Classes and Objects in C++

Classes
Private and public

Relation between CLASS and STRUCT

Classes

Example
Point class

How the methods know from which object they are invoked?

Constructors and Destructors

Constructors and Destructors

Initialisation of Point class
Example

Constructors

List in classes

Destructor

Inheritance in C++

Access rights and inheritance

Example A: Class definition

Example A:
Constructor, Destructor

Example A: Functions

Example A: Main() functions

Abstraction

Encapsulation

Task